<!-- tinyMCE -->
<script language="javascript" type="text/javascript" src="{$INA.templates}jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
   tinyMCE.init({ldelim}
		mode : "specific_textareas",
		/* editor_selector : "mceEditor", */

	    elements : "elm1,elm2",
		theme:     "advanced",
		editor_deselector : "mceNoEditor",
		
		theme_advanced_disable : "styleselect, help, visualaid, hr",
		
		theme_advanced_buttons1_add : "forecolor,backcolor",
		theme_advanced_buttons2_add_before : "advhr,separator",
		
        // plugins : "advlink,advhr,advimage,fullscreen,save,preview",
        plugins : "advlink,advhr,advimage,fullscreen,save,preview",
		theme_advanced_buttons3_add : "preview,fullscreen",
		plugin_preview_width : "500",
		plugin_preview_height : "600",
		
		relative_urls : false,
		remove_script_host : false,
		document_base_url : "{$INA.root}",
		
        // file_browser_callback: "tinyupload",
		file_browser_callback: "filebrowser",
		
		theme_advanced_buttons1_add_before : "save,newdocument,separator",
		
		theme_advanced_toolbar_location : "top",
		/*theme_advanced_toolbar_align : "left",*/
 	        theme_advanced_path_location : "bottom",
		
	        extended_valid_elements : "textarea[rel]|input[rel]|a[name|href|target|title|onclick],script[charset|defer|language|src|type],object[classid|codebase|width|height|align],param[name|value],embed[quality|type|pluginspage|width|height|src|align]",  /* ", script[charset|defer|language|src|type]", object[classid|codebase|width|height],param[name|value],embed[src|quality|width|height|type|pluginspage|bgcolor], 
	        valid_elements : "script[language|type|src]",
	        cleanup : true,*/
	    
		/* content_css : "/example_data/example_full.css",*/
       
	    theme_advanced_resize_horizontal : false,
		theme_advanced_resizing : true,
		
		fullscreen_settings : {ldelim}
    		theme_advanced_path_location : "top",
    		theme_advanced_disable : "save"
    	{rdelim}
   {rdelim});
   
   
   function filebrowser(field_name, url, type, win) {ldelim}

    fileBrowserURL = "/templates/admin/pdw_file_browser/index.php?filter=" + type;
                        

   	tinyMCE.activeEditor.windowManager.open({ldelim}
   		title: "PDW File Browser",
   		url: fileBrowserURL,
   		width: 950,
   		height: 650,
   		inline: 0,
   		maximizable: 1,
   		close_previous: 0
   	{rdelim},{ldelim}
   		window : win,
   		input : field_name
   	{rdelim});		
   {rdelim}
</script>
<!-- /tinyMCE -->